package com.ezops.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.ezops.dao.generics.dao.hibernate.GenericDAOImpl;
import com.ezops.dao.generics.search.Search;
import com.ezops.models.ClientFields;

@Repository
public class ClientFieldDAO extends GenericDAOImpl<ClientFields, Integer> {
	/**
	 * Return all client fields  for the given client and asset type.
	 * 
	 * @param clientId
	 * @param asetClassId
	 * @return
	 */
	public List<ClientFields> getAllClientFields(int clientId,
			int asetClassId) {
		Search searchCriteria = new Search();
		searchCriteria.addFilterEqual("clientId", clientId);
		//searchCriteria.addFilterEqual("assetId",asetClassId);
		return search(searchCriteria);
	}

}
